<template>
  <div>
    <!-- 树形控件 -->
    <el-tree
      :data="data"
      show-checkbox
      node-key="id"
      :default-expanded-keys="[2, 3]"
      :default-checked-keys="[5]"
      :props="defaultProps"
    >
    </el-tree>

    <Chaoren></Chaoren>
    <Header></Header>
    <Main></Main>
    <Footer></Footer>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
//引入子组件
import Header from "./Header";
import Main from "./Main";
import Footer from "./Footer";
import Chaoren from "./Chaoren";
export default {
  name: "Dashboard",
  data() {
    return {
      data: [
        {
          id: 1,
          label: "黑龙江",
          children: [
            {
              id: 4,
              label: "大庆",
              children: [
                {
                  id: 9,
                  label: "油条",
                },
                {
                  id: 10,
                  label: "摸摸",
                },
              ],
            },
          ],
        },
      ],
      defaultProps: {
        children: "children",
        label: "label",
      },
    };
  },
  computed: {
    ...mapGetters(["name"]),
  },
  components: {
    Header,
    Main,
    Footer,
    Chaoren,
  },
};
</script>

<style lang="scss" scoped>
</style>
